﻿<UserControl x:Class="XamlHelpmeet.UI.Editors.DynamicFormComboBoxEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:cvtrs="clr-namespace:XamlHelpmeet.UI.Converters"
             xmlns:local="clr-namespace:XamlHelpmeet.UI.Editors">
    <UserControl.Resources>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>

        <cvtrs:BindingModeEnumConverter x:Key="bindingModeEnumConverter" />

    </UserControl.Resources>

    <StackPanel>

        <StackPanel Margin="3"
                    HorizontalAlignment="Left"
                    Orientation="Horizontal">
            <TextBlock Width="40" Text="Label" />
            <TextBox Width="125"
                     HorizontalAlignment="Left"
                     Text="{Binding Path=AssociatedLabel,
                                    Mode=TwoWay}" />
        </StackPanel>

        <StackPanel Margin="3"
                    HorizontalAlignment="Left"
                    Orientation="Horizontal">
            <TextBlock Width="40" Text="Mode" />
            <ComboBox Width="Auto"
                      Focusable="False"
                      FontSize="10"
                      IsSynchronizedWithCurrentItem="True"
                      Loaded="cboBindingMode_Loaded"
                      SelectedValue="{Binding Path=BindingMode,
                                              Mode=TwoWay,
                                              Converter={StaticResource bindingModeEnumConverter}}" />
        </StackPanel>


    </StackPanel>

</UserControl>
